#include "fan.h"
#include "rtthread.h"
#include "board.h"

rt_uint8_t fan_pin;
void fan_init(void)
{
    fan_pin = rt_pin_get("PA.5");
    // 设置引脚为输出方式
    rt_pin_mode(fan_pin, PIN_MODE_OUTPUT);
}

void fan_on(void)
{
    rt_pin_write(fan_pin, 1);
    //hdr_off();
}

void fan_off(void)
{
    rt_pin_write(fan_pin, 0);
    //hdr_on();
}
